﻿namespace Bean.Entity.Dto.PolicyPushDto;

/// <summary>
/// 携程政策推送类
/// </summary>
public class OtaCtripPolicyPushDto
{
    /// <summary>
    /// 政策ID
    /// </summary>
    public long PolicyID { get; set; }
    
    /// <summary>
    /// 概要信息
    /// </summary>
    public SummaryUnitInfo SummaryUnit { get; set; }

    /// <summary>
    /// RuleRestrict
    /// </summary>
    public RuleRestrictInfo RuleRestrict { get; set; }
    
    /// <summary>
    /// 库存信息
    /// </summary>
    public InventoryUnitInfo InventoryUnit { get; set; }
    
    /// <summary>
    /// 去程航班
    /// </summary>
    public GoFlightUnitInfo GoFlightUnit { get; set; }
    
    /// <summary>
    /// 身份认证，支付方式等条件
    /// </summary>
    public ConditionUnitInfo ConditionUnit { get; set; }
    
    /// <summary>
    /// 价格信息
    /// </summary>
    public PriceUnitInfo PriceUnit { get; set; }

    /// <summary>
    /// 
    /// </summary>
    public class SummaryUnitInfo
    {
        /// <summary>
        /// 产品类型(从1:NFD-普通,依次) NFD-普通 ZZMP-占座免票 DKHXY-大客户协议 ZZ-中转 ZZQC-中转弃程 BJ-包机 QW-切位 HSVIP-航司VIP
        /// OTHER-其他
        /// </summary>
        public string ProductType { get; set; }

        /// <summary>
        /// 是否惠选(T:是F:否)
        /// </summary>
        public string IsSecurity { get; set; }

        /// <summary>
        /// 是否申请
        /// </summary>
        public string ApplyFlag { get; set; }

        /// <summary>
        /// 销售时间限制(格式：0000-1000,1300-2359最多支持三段时间列表)
        /// </summary>
        public string SaleTimeLimit { get; set; }

        /// <summary>
        /// Date可售属性
        /// </summary>
        public int DateCanSale { get; set; }

        /// <summary>
        /// Pata价格上浮控制值
        /// </summary>
        public int PataPriceValue { get; set; }

        /// <summary>
        /// T-是 F-否
        /// </summary>
        public string IsValid { get; set; }

        /// <summary>
        /// PATA验价上浮控制选项
        /// </summary>
        public int PataVerifyPriceOption { get; set; }

        /// <summary>
        /// 乘客年龄限制说明
        /// </summary>
        public string PassengerAgeLimitRemarks { get; set; }

        /// <summary>
        /// 定向投放
        /// </summary>
        public List<string> policyThrowOns { get; set; }

        /// <summary>
        /// 报销凭证类型(0-无、1-行程单、2-发票、3-行程单+差额发票)
        /// </summary>
        public int VouchersType { get; set; }

        /// <summary>
        /// 是否奖励需求单
        /// </summary>
        public string FromPriceDisadvantage { get; set; }

        /// <summary>
        /// 是否PATA
        /// </summary>
        public string NeedPATA { get; set; }

        /// <summary>
        /// 灵隐
        /// </summary>
        public string SmartHide { get; set; }

        /// <summary>
        /// Pata特殊指令
        /// </summary>
        public string PataCode { get; set; }

        /// <summary>
        /// 政策备注
        /// </summary>
        public string TicketRemark { get; set; }

        /// <summary>
        /// Pata验价基准
        /// </summary>
        public int PataBasePrice { get; set; }

        /// <summary>
        /// Pata价格下浮控制值
        /// </summary>
        public int DownFloatValue { get; set; }

        public string IsShortageFilter { get; set; }

        /// <summary>
        /// 是否是共享 T-是 F-否
        /// </summary>
        public string IsShareFlight { get; set; }

        /// <summary>
        /// 成行人数信息,支持固定人数、范围(如果填2，表示只适用于两人同行，如果填2-3表示只适用于2-3人同行中间用","隔开)
        /// </summary>
        public string PassengersNum { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string RefundChange { get; set; }

        /// <summary>
        /// 适用场景 None Train 机+铁 Bus 机+大巴 Scenery 机+景 Lounge 机+休息室 Safety 机+安检 Pub 机+酒店 Wifi
        ///     机+wifi Shuttle 机+接送机 Luggage 机+行李 Coupon 机+优惠券 该字段需要申请权限才能使用，如需使用，请系统业务开通。
        /// </summary>
        public List<string> PackageFlagList { get; set; }

        /// <summary>
        /// 最大停留天数(航程类型为往返时生效)
        /// </summary>
        public int MaxStopDay { get; set; }

        /// <summary>
        /// 销售日期止(此处目前只能用string类型 不能用DateTime 携程那边有问题 日期会少一天)
        /// </summary>
        public DateTime ExpiryDate { get; set; }

        /// <summary>
        /// 供应商政策ID
        /// </summary>
        public long SupplierPolicyID { get; set; }

        /// <summary>
        /// 舱位等级 F：头等舱 C:公务舱  Y:经济舱 (2：头等舱 1:公务舱 0:经济舱)
        /// </summary>
        public int Class { get; set; }

        /// <summary>
        /// 提前预订天数
        /// </summary>
        public int AdvanceDay { get; set; }

        /// <summary>
        /// 最大提前预订天数
        /// </summary>
        public int MaxAdvanceDay { get; set; }

        /// <summary>
        /// 退改签ID
        /// </summary>
        public int? RcID { get; set; }

        /// <summary>
        /// 政策代码
        /// </summary>
        public string PolicyCode { get; set; }

        /// <summary>
        /// 最小停留天数(航程类型为往返时生效)
        /// </summary>
        public int MinStopDay { get; set; }

        /// <summary>
        /// 政策来源
        /// </summary>
        public int PolicySource { get; set; }

        /// <summary>
        /// 航程类型 单程（S)，往返（D）
        /// </summary>
        public string FlightWay { get; set; }

        /// <summary>
        /// 代理
        /// </summary>
        public string ShieldPurchase { get; set; }

        /// <summary>
        /// 是否适用儿童 0 T是，1 F否
        /// </summary>
        public int ApplyChild { get; set; }

        /// <summary>
        /// 授权Office号
        /// </summary>
        public string OfficeNo { get; set; }

        /// <summary>
        /// 始发机场代码
        /// </summary>
        public string DepartPort { get; set; }

        /// <summary>
        /// 到达机场代码
        /// </summary>
        public string ArrivePort { get; set; }

        /// <summary>
        /// 销售日期起 (此处目前只能用string类型 不能用DateTime 携程那边有问题 日期会少一天)
        /// </summary>
        public DateTime EffectDate { get; set; }

        /// <summary>
        /// 航空公司二字码
        /// </summary>
        public string AirLine { get; set; }

        /// <summary>
        /// IATA
        /// </summary>
        public string IATANo { get; set; }

        /// <summary>
        /// 出差优选, value: 1 出行优选, value: 2 商旅特惠, value: 3 超值低价, value: 4 省钱推荐, value: 5 惊喜航班, value: 6
        /// </summary>
        public int ZhiXingProductType { get; set; }
    }

    /// <summary>
    /// 
    /// </summary>
    public class GoFlightUnitInfo
    {
        /// <summary>
        /// 代理
        /// </summary>
        public string ShieldPurchase { get; set; }

        /// <summary>
        /// 规则名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string FromPriceDisadvantage { get; set; }

        /// <summary>
        /// 退票计算基准(票面价(S), 标准价（F), FD价(D))
        /// </summary>
        public string FeeBasis { get; set; }

        /// <summary>
        /// 最低退票费
        /// </summary>
        public decimal MinFeeExpense { get; set; }

        /// <summary>
        /// 退票手续费率 0表示不得退改签； 10-2-20，表示起飞前2小时之前的手续费比例是10%，起飞前2小时（含）以内及起飞后的手续费比例是20%； 10-2-20-0-50，表示起飞前2小时之前的手续费比例是10%，起飞前2小时（含）以内收20%，航班起飞后收50%；
        ///     10-0-50，表示起飞前收10%，起飞后收50%； 50-0-100，表示起飞前收50%，起飞后不得退票； 5选1
        /// </summary>
        public string RefundRateRemarks { get; set; }

        /// <summary>
        /// 更改手续费率 同上
        /// </summary>
        public string ReroutRateRemarks { get; set; }

        /// <summary>
        /// 允许签转 T-是 F-否
        /// </summary>
        public string IsEndorse { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remarks { get; set; }
    }

    /// <summary>
    /// 
    /// </summary>
    public class InventoryUnitInfo
    {
        /// <summary>
        /// 代理
        /// </summary>
        public string ShieldPurchase { get; set; }

        /// <summary>
        /// 是否来自需求单
        /// </summary>
        public string FromPriceDisadvantage { get; set; }

        /// <summary>
        /// 库存查询模式 FAV-见舱 FIX-定额
        /// </summary>
        public string InventoryType { get; set; }

        /// <summary>
        /// 是否订位 T-是 F-否
        /// </summary>
        public string IsBooking { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string BookingType { get; set; }

        /// <summary>
        /// 外放舱位数量小于等于阈值时订位
        /// </summary>
        public int BookingThreshold { get; set; }

        /// <summary>
        /// 是否紧张位置过滤
        /// </summary>
        public string IsShortageFilter { get; set; }

        /// <summary>
        /// 紧张过滤阈值
        /// </summary>
        public int ShortageFilterCount { get; set; }

        /// <summary>
        ///  FIX模式参数(FIX模式时必选)
        /// </summary>
        public FIX FIX { get; set; }
    }

    /// <summary>
    /// FIX模式参数实体
    /// </summary>
    public class FIX
    {
        /// <summary>
        /// 已售票数量(查询时结果，新增时该节点无效)
        /// </summary>
        public int SaledTicketNum { get; set; }

        /// <summary>
        /// 可售座位数
        /// </summary>
        public int TicketInventory { get; set; }
    }
    
    /// <summary>
    /// 身份认证，支付方式等条件
    /// </summary>
    public class ConditionUnitInfo
    {
        public string FromPriceDisadvantage { get; set; }
        /// <summary>
        /// ID-身份证 PASSPORT-护照 STC-学生证 MTC-军人证 DRLC-驾驶证 RP-回乡证 MTP-台胞证 TP-台湾通行证 HMP-港澳通行证 ISC-国际海员证 PRC-外国人永久居留证 TC-旅行证 SOC-士兵证 TID-临时身份证 RBT-户口薄 PLC-警官证 BRC-出生证明 BRD-其他
        /// </summary>
        public List<string> IDCardList { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public List<string> PayTypeList { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public List<string> CardTypeList { get; set; }
    }
    
    
    /// <summary>
    /// 价格信息实体
    /// </summary>
    public class PriceUnitInfo
    {
        /// <summary>
        /// 代理
        /// </summary>
        public string ShieldPurchase { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string FromPriceDisadvantage { get; set; }
        /// <summary>
        /// 是否组合价
        /// </summary>
        public bool IsCompositionPrice { get; set; }

        /// <summary>
        /// 买赠信息
        /// </summary>
        public string CompositionPriceRemark { get; set; }

        /// <summary>
        /// 票面价
        /// </summary>
        public int PrintPrice { get; set; }

        /// <summary>
        /// 建议销售价
        /// </summary>
        public decimal SalePrice { get; set; }

        /// <summary>
        /// 结算价(ReturnPoint和SetPrice至少填一项)
        /// </summary>
        public decimal SetPrice { get; set; }

        /// <summary>
        /// 留钱
        /// </summary>
        public decimal ReturnPrice { get; set; }
        /// <summary>
        /// 代理费率(ReturnPoint和SetPrice至少填一项)
        /// </summary>
        public decimal ReturnPoint { get; set; }
        /// <summary>
        /// 竞价类型
        /// </summary>
        public int bidType { get; set; }

        /// <summary>
        /// 不知道什么东西
        /// </summary>
        public bool ForceNomal { get; set; }
        /// <summary>
        /// 竞价区间
        /// </summary>
        public decimal BiddingSpace { get; set; }
    }
    
    
    /// <summary>
    /// RuleRestrict
    /// </summary>
    public class RuleRestrictInfo
    {
        /// <summary>
        /// 代理
        /// </summary>
        public string ShieldPurchase { get; set; }
        /// <summary>
        /// 规则名
        /// </summary>
        public string Name { get; set; }
        public string FromPriceDisadvantage { get; set; }

        /// <summary>
        /// 退票计算基准(票面价(S), 标准价（F), FD价(D))
        /// </summary>
        public string FeeBasis { get; set; }
        //
        // 摘要:
        //     
        /// <summary>
        /// 最低退票费
        /// </summary>
        public decimal MinFeeExpense { get; set; }
        /// <summary>
        /// 退票手续费率 0表示不得退改签； 10-2-20，表示起飞前2小时之前的手续费比例是10%，起飞前2小时（含）以内及起飞后的手续费比例是20%； 10-2-20-0-50，表示起飞前2小时之前的手续费比例是10%，起飞前2小时（含）以内收20%，航班起飞后收50%；
        ///     10-0-50，表示起飞前收10%，起飞后收50%； 50-0-100，表示起飞前收50%，起飞后不得退票； 5选1
        /// </summary>
        public string RefundRateRemarks { get; set; }

        /// <summary>
        /// 更改手续费率 同上
        /// </summary>
        public string ReroutRateRemarks { get; set; }

        /// <summary>
        /// 允许签转 T-是 F-否
        /// </summary>
        public string IsEndorse { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remarks { get; set; }
    }
}